#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    srand((unsigned int)(time(nullptr)));
}

Widget::~Widget()
{
    delete ui;
}

void Widget::on_pushButton_accept_clicked()
{
    ui->label->setText("女神女神，快来嘴儿一个~~ mua~~");
}

void Widget::on_pushButton_reject_clicked()
{

}

void Widget::on_pushButton_reject_pressed()
{
    //获取当前窗口尺寸大小
    int width=this->geometry().width();
    int height=this->geometry().height();

    //重新生成按钮的位置
    int x=rand()%width;
    int y=rand()%height;

    //移动按钮的位置
    ui->pushButton_reject->move(x,y);

}

